$def with (content)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>py-denon Console</title>
		<style type="text/css">
			body{margin:0;padding:0;}

			#iphone{width: 320px;-webkit-text-size-adjust:none;font-family: verdana,tahoma; font-size: 11px; }
			#pageContent{padding: 5px;}
			ul{list-style:none;margin:0;padding:0;}
			ul.nav li a{width:100%;font-size: 16px;background: url('/static/images/btn-blue-fade.png') repeat-x;#e5e5e5;padding: 18px 0;font-weight:bold;display:block;text-decoration:none;color:#000;}
			ul.nav li div.content{padding: 5px;min-height: 240px;}
			.hidden{display:none;}
			h1{font-size: 16px;}
			h2{font-size: 14px;}
			button{border: 1px solid #017CB1; background: #0F307D; color: #01adf7; font-family: verdana, tahoma;margin: 2px;padding: 10px;font-size: 12px;}
			input {background: #01adf7; color: #0F307D;border: #01adf7}
			.content, #pageContent {background: #0F307D;color: #01adf7;}

			small button{padding: 2px;}
		</style>
		<meta name="viewport" content="width=320" /> 
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
		<script type="text/javascript">
			var readBuffer = 0;
			var bufferButton = '#bufferButton';

			function toggleBuffer(){
				onTxt = "Read Buffer: ON";
				offTxt = "Read Buffer: OFF";
				if (readBuffer == 0){
					readBuffer = 1;
					\$(bufferButton).text(onTxt);
				}else{
					readBuffer = 0;
					\$(bufferButton).text(offTxt);
				}
				return readBuffer
			}

			function switchBuffer(onOff){
				onTxt = "Read Buffer: ON";
				offTxt = "Read Buffer: OFF";
				if (onOff == 0){
					readBuffer = 0;
					\$(bufferButton).text(offTxt);
				}else{
					readBuffer = 1;
					\$(bufferButton).text(onTxt);
				}
				return readBuffer
			}

			function sendCommand(cmd){
				var cmd;
				\$('#command button').attr("disabled","disabled");	
				 \$.ajax({
					url: "/ajax/",
					async: false,
					processData: false,
					data: 'readbuffer=' + readBuffer + '&command=' + cmd,
					dataType: 'json',
					success: function(json){
						var out = null;

						if(json['status'] != 'success'){
							\$('#output').html('<b>Error:</b> ' + json['message']);
							return false;
						}
					
						out = "Command sent: " + cmd;
						for (buf in json['buffer']){
							out += " " + json['buffer'][buf];
						}

						\$('#output').text(out);
						return true;
					},
					error: function(e, f){
						return false;
					}
				 });
				\$('#command button').attr("disabled","");
			}
		</script>
    </head>
    <body>
		<div id="iphone">
			<ul class="nav">
				<li><a href="javascript:void(0);" onclick="\$('#status').slideToggle(200);">Status</a>
					<div class="content hidden" id="status">
						<button onclick="switchBuffer(1);sendCommand('PW?,MV?,SI?');">Get status</button>
					</div>
				
				</li>
				<li><a href="javascript:void(0);" onclick="\$('#command').slideToggle(200);">Command</a>
				<div class="content" id="command">
						<button onclick="sendCommand('PWON');">Power On</button>
						<button onclick="sendCommand('PWSTANDBY');">Power Off</button>
						<button onclick="sendCommand('MUON');">Mute</button>
						<button onclick="sendCommand('MVUP');">VOL UP</button>
						<button onclick="sendCommand('MVDOWN');">VOL DOWN</button>
						<button onclick="sendCommand('SICD');">CD</button>
						<button onclick="sendCommand('SIATUNER');">TUNER</button>
						<hr />
						<form onsubmit="sendCommand(\$('#cmd').val());return false;">
							<input type="text" name="command" id="cmd" value="MVUP" />
							<small><button type="submit" id="cmdBtn"/>Send command</button></small>
						</form>
						<button onclick="toggleBuffer();" id="bufferButton">Read Buffer: Off</button>
						<div id="output"></div>
				</div></li>
			</ul>
			<div id="output"></div>

<div id="pageContent">
$:content
</div>
		</div>
    </body>
</html>
